<template>
  <div class="container">
    <labledsq :tableData="directorysarr" @ye="edd" :total="total" />
  </div>
</template>

<script>
import { lablelist } from '../../api/base/directorys'
import labledsq from '../components/labledsq.vue'
export default {
  data () {
    return {
      directorysarr: [],
      total: 0,
      index: 1
    }
  },

  components: {
    labledsq
  },
  created () {

  },
  methods: {
    edd (a) {
      this.lablelist(a)
    },
    async lablelist (a) {
      // console.log(a)
      const { data } = await lablelist(a)

      data.items.forEach(obj => {
        obj.index = this.index
        obj.isDisabled = false
        this.index++
      })
      this.index = 1
      this.directorysarr = data.items

      this.total = data.counts
      // this.directorysarr = data.items
    }
  }
}
</script>

<style scoped lang='less'></style>
